# This file contains snippets that are always defined. I personally
# have snippets for signatures and often needed texts

# sligthly lower priority than everything else since specialized versions
# should overwrite. The user needs to adjust her priority in her snippets to
# ~-55 so that other filetypes will still overwrite.
priority -40

global !p
import hashlib
import secrets
import sys
import datetime 

def	ywr():
	tds= datetime.datetime.now().strftime("%gw%Vd%u%H")
	kyb4=bytes(str(secrets.randbits(33)), encoding='utf-8' )
	sha0 = hashlib.sha3_512(kyb4).hexdigest()
	sha1= sha0[0:10]
	return f"{tds}_{sha1}"
endglobal


snippet _i "inject " w
puts [format "### {`!v bufname("%")`}-{line `!v line(".")`} %8s" "{$1:`!p if not snip.c: snip.rv = ywr()`}"] 
endsnippet

